export interface Sku {
    skuId?: number,
    skuTitle: string,
    skuName: string,
    spuId: number,
    categoryId: number,
    defaultPic?: string,
    price: number,
    skuDescription: string,
    stock: number,
}
export interface Spu {
    spuId?: number,
    spuName: string,
    categoryId: number,
    brandName: string,
    status: string,
    createTime: string, // LocalDateTime 在 TypeScript 中通常用 string 表示
    userId?: number,
    spuDescription: string
}

export interface GoodsCreateDTO {
    spuInfo: Spu,
    skuList: SkuAndSaleAttributeAndPictureDTO[],
    groupAttributeList: GroupAttributeValuesDTO[],
    skuSaleAttrList: AttributeAndValuesDTO[]
}

export interface SpuCategory {
    categoryId?: number; // 使用可选属性表示可能为null或未定义的情况
    name: string;
    parentId?: number;
    sort?: number;
    icon?: string;
    productUnit?: string;
}

export interface SpuCategoryVO extends SpuCategory {
    children?: SpuCategoryVO[];
}

export interface SkuAttribute {
    attributeId?: number,
    attrName: string,
    searchType: number,
    valueSelect: string,
    attrType: number,
    status: number,
    categoryId: number | null,
    quickShow: number
}
export interface AttributeAssociatedVO extends SkuAttribute {
    isAssociated: boolean,
}
export interface SkuAttributeGroup {
    attrGroupId?: number,
    groupName: string,
    sort: number,
    description: string,
    categoryId: number | null,
}
export interface AttributeAndValuesDTO extends SkuAttribute {
    attributeValues?: string[],
}
export interface SkuAndSaleAttributeAndPictureDTO extends SkuAttribute {
    attributeValues?: string[],
    skuPictureList: string[],
}
//sku与销售属性封装实体类
export interface SkuAndSaleAttributeDTO extends Sku{
    saleAttributeList: SaleAttributeAndValue[],//销售属性与属性值
}
//销售属性与属性值封装实体类
export interface SaleAttributeAndValue extends SkuAttribute {
    value?: string,
}
export interface GroupAttributeValuesDTO extends SkuAttributeGroup {
    attributes?: AttributeAndValuesDTO[],
}
export interface SkuModifyDTO extends Sku{
    skuPictureList:string[]
}

export interface SkuItemDetailVO{
    spu:Spu,
    sku:Sku,
    skuPictureList:string[],
    groupAttributeValues:GroupAttributeValuesDTO[],
    skuSaleAttrWithValueWithSkuIdsVOList:SkuSaleAttListVO[],
}
export interface SkuSaleAttListVO extends SkuAttribute{
    skuSaleAttrWithValueWithSkuIdsVOList:SkuSaleAttrWithValueWithSkuIdsVO[],
    selectSkuList:number[]
}
export interface SkuSaleAttrWithValueWithSkuIdsVO{
    attributeValue:string,
    skuIds:number[]
}
